import { Injectable } from '@angular/core';
import {Observable} from "rxjs/Observable";
import {MsgResult} from "../../../../models/msg-result";
import {DamAPI} from "../../peach-constants";
import {RequestUtil} from "../../../../util/request-util";

@Injectable()
export class MonitorDataService {

  constructor(
    private requestUtil: RequestUtil
  ) { }


  //后台页面空气质量数据站点表
  getHideAirQualitySiteData(obj):Observable<MsgResult>{
    let params = "format=json&queryCheckCode="+obj.queryCheckCode+"&startTime="+obj.startTime+"&endTime="+obj.endTime+"&tableName="+obj.tableName;
    return this.requestUtil.get(DamAPI.getHideAirQualitySite,params);
  }

  //后台页面空气质量数据区域表
  getHideAirQualityAreaData(obj):Observable<MsgResult>{
    let params = "format=json&queryCheckCode="+obj.queryCheckCode+"&startTime="+obj.startTime+"&endTime="+obj.endTime+"&tableName="+obj.tableName;
    return this.requestUtil.get(DamAPI.getHideAirQualityArea,params);
  }

  //后台页面空气质量数据区域表
  getHideAirQualityMinData(obj):Observable<MsgResult>{
    let params = "format=json&queryCheckCode="+obj.queryCheckCode+"&startTime="+obj.startTime+"&endTime="+obj.endTime+"&tableName="+obj.tableName;
    return this.requestUtil.get(DamAPI.getHideAirQualityMin,params);
  }

}
